﻿using System;

namespace Rsdn.SmartApp
{
	/// <summary>
	/// Хелпер для получения пустого <see cref="IObservable{T}"/>.
	/// </summary>
	public static class EmptyObservable<T>
	{
		/// <summary>
		/// Значение.
		/// </summary>
		public static readonly IObservable<T> Value = new DummyObservable();

		#region DummyObservable class
		private sealed class DummyObservable : IObservable<T>
		{
			public IDisposable Subscribe(IObserver<T> observer)
			{
				return DisposableHelper.Empty;
			}
		}
		#endregion
	}
}